export type Actions = {
    actions:Array<Action>;
}

export type Action = CreacteButtonAction|CreacteInputAction|CreacteTextareaAction|CreacteRadioAction|CreacteSelectAction;

export type CompnentType = 'BUTTON'|'INPUT'|'SELECT'|'TEXTAREA'|'RADIO'

export type Textarea = {
    content?:string;
}

export type Button = {
    buttonType?: 'primary'|'text'|'link'
}

export type Input = {
    defaultValue?: string;
    placeholder?: string;
}

export type EventReference = {
    type?: CompnentType;
    name?: string;
}

export type CreacteButtonAction = {
    actionType: 'create button event';
    eventReference: EventReference & Button;
}

export type CreacteInputAction = {
    actionType: 'create input event';
    eventReference: EventReference & Input;
}
export type CreacteTextareaAction = {
    actionType: 'create textarea event';
    eventReference: EventReference & Textarea;
}
export type CreacteRadioAction = {
    actionType: 'create radio event';
    eventReference: EventReference;
}

export type CreacteSelectAction = {
    actionType: 'create select event';
    eventReference: EventReference;
}

